chore(deps): update dependency @ai-sdk/react to v3#1039
Conversation
d85e409 to
a3e5647
Compare
| @@ -17,7 +17,7 @@ | |||
| }, | |||
| "dependencies": { | |||
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
|
|
||
| "@ai-sdk/provider-utils": ["@ai-sdk/provider-utils@3.0.19", "", { "dependencies": { "@ai-sdk/provider": "2.0.0", "@standard-schema/spec": "^1.0.0", "eventsource-parser": "^3.0.6" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-W41Wc9/jbUVXVwCN/7bWa4IKe8MtxO3EyA0Hfhx6grnmiYlCvpI8neSYWFE0zScXJkgA/YK3BRybzgyiXuu6JA=="], | ||
|
|
||
| "@ai-sdk/react": ["@ai-sdk/react@2.0.118", "", { "dependencies": { "@ai-sdk/provider-utils": "3.0.19", "ai": "5.0.116", "swr": "^2.2.5", "throttleit": "2.1.0" }, "peerDependencies": { "react": "^18 || ~19.0.1 || ~19.1.2 || ^19.2.1", "zod": "^3.25.76 || ^4.1.8" }, "optionalPeers": ["zod"] }, "sha512-K/5VVEGTIu9SWrdQ0s/11OldFU8IjprDzeE6TaC2fOcQWhG7dGVGl9H8Z32QBHzdfJyMhFUxEyFKSOgA2j9+VQ=="], | ||
| "@ai-sdk/react": ["@ai-sdk/react@3.0.1", "", { "dependencies": { "@ai-sdk/provider-utils": "4.0.0", "ai": "6.0.1", "swr": "^2.2.5", "throttleit": "2.1.0" }, "peerDependencies": { "react": "^18 || ~19.0.1 || ~19.1.2 || ^19.2.1" } }, "sha512-XUPDMFgalNtqBQg+Q3UiiEmWE3PC5pAoc+Drs5Z1Mxqe57za+hKCEwViYADuqeZrc0q6PXTzbcFlQb3pjyGjcQ=="], | ||
|
|
||
| "@alloc/quick-lru": ["@alloc/quick-lru@5.2.0", "", {}, "sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw=="], | ||
|
|
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
a3e5647 to
2669bcb
Compare
2669bcb to
ae32a47
Compare
| "@ai-sdk/openai": "2.0.88", | ||
| "@ai-sdk/react": "2.0.118", | ||
| "@ai-sdk/react": "3.0.3", | ||
| "@next/third-parties": "16.1.1", |
There was a problem hiding this comment.
Bug: The ai package version in package.json is outdated, causing a synchronous call to the now-asynchronous convertToModelMessages() function. This will lead to a runtime error.
Severity: CRITICAL | Confidence: High
🔍 Detailed Analysis
The update of @ai-sdk/react to v3.0.3 introduces a transitive dependency on ai@6.0.3. However, package.json still specifies ai: "5.0.116". The newer version of the ai package includes a breaking change where convertToModelMessages() is now an asynchronous function. The code in src/app/api/chat/route.ts calls this function synchronously. This will cause streamText() to receive a Promise instead of the expected message array, leading to a runtime failure when a POST request is made to the /api/chat endpoint.
💡 Suggested Fix
Update the ai package version in package.json to ^6.0.3 to match the dependency of @ai-sdk/react. Then, modify the call to convertToModelMessages() in src/app/api/chat/route.ts to be asynchronous by adding await.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L21
Potential issue: The update of `@ai-sdk/react` to `v3.0.3` introduces a transitive
dependency on `ai@6.0.3`. However, `package.json` still specifies `ai: "5.0.116"`. The
newer version of the `ai` package includes a breaking change where
`convertToModelMessages()` is now an asynchronous function. The code in
`src/app/api/chat/route.ts` calls this function synchronously. This will cause
`streamText()` to receive a `Promise` instead of the expected message array, leading to
a runtime failure when a POST request is made to the `/api/chat` endpoint.
Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7883508
ae32a47 to
26e1210
Compare
26e1210 to
6e79da9
Compare
18ce936 to
83e83c0
Compare
edee2ca to
e848f4d
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This PR contains the following updates:
2.0.119→3.0.185Release Notes
vercel/ai (@ai-sdk/react)
v3.0.185Compare Source
Patch Changes
v3.0.184Compare Source
Patch Changes
e76a29a]v3.0.182Compare Source
Patch Changes
253bd5a]57ec10f]v3.0.180Compare Source
Patch Changes
ac6f27e]v3.0.179Compare Source
Patch Changes
v3.0.178Compare Source
Patch Changes
f591416]v3.0.177Compare Source
Patch Changes
v3.0.176Compare Source
Patch Changes
v3.0.175Compare Source
Patch Changes
7beadf0]v3.0.174Compare Source
Patch Changes
v3.0.173Compare Source
Patch Changes
a727da4: chore: ensure consistent import handling and avoid import duplicates or cycles48f842a]a727da4]5fee301]v3.0.172Compare Source
Patch Changes
19d587a]v3.0.171Compare Source
Patch Changes
a7f3c72: trigger release for all packages after provenance setup2662bb5]a7f3c72]v3.0.170Compare Source
Patch Changes
v3.0.169Compare Source
Patch Changes
v3.0.168Compare Source
Patch Changes
b8d28f4]v3.0.167Compare Source
Patch Changes
v3.0.166Patch Changes
v3.0.165Patch Changes
v3.0.164Compare Source
Patch Changes
v3.0.163Compare Source
Patch Changes
v3.0.162Compare Source
Patch Changes
v3.0.161Compare Source
Patch Changes
v3.0.160Compare Source
Patch Changes
295beba]v3.0.159Compare Source
Patch Changes
ff11aee]v3.0.158Compare Source
Patch Changes
v3.0.157Compare Source
Patch Changes
06764c5]v3.0.156Compare Source
Patch Changes
v3.0.155Patch Changes
f152133]v3.0.154Patch Changes
d42076d]v3.0.153Compare Source
Patch Changes
v3.0.152Patch Changes
1003609]v3.0.151Patch Changes
v3.0.150Compare Source
Patch Changes
v3.0.149Compare Source
Patch Changes
6247886]v3.0.148Compare Source
Patch Changes
v3.0.147Compare Source
Patch Changes
v3.0.146Compare Source
Patch Changes
0469aed]v3.0.145Compare Source
Patch Changes
v3.0.144Compare Source
Patch Changes
6f75953]v3.0.143Compare Source
Patch Changes
v3.0.142Compare Source
Patch Changes
v3.0.141Patch Changes
v3.0.140Patch Changes
v3.0.139Patch Changes
v3.0.138Compare Source
Patch Changes
v3.0.137Patch Changes
df6a330]v3.0.136Patch Changes
ed6876b]v3.0.135Patch Changes
055cd68: fix: publish v6 to latest npm dist tag055cd68]v3.0.134Patch Changes
28fd5a5]v3.0.133Patch Changes
14f25f9]v3.0.132Compare Source
Patch Changes
v3.0.131Compare Source
Patch Changes
v3.0.130Compare Source
Patch Changes
v3.0.129Compare Source
Patch Changes
v3.0.128Compare Source
Patch Changes
578615a]v3.0.127Compare Source
Patch Changes
v3.0.126Patch Changes
v3.0.124Compare Source
Patch Changes
v3.0.123Compare Source
Patch Changes
v3.0.122Compare Source
Patch Changes
78c0e26]v3.0.121Compare Source
Patch Changes
ab286f1]d68b122]v3.0.120Compare Source
Patch Changes
64ac0fd]v3.0.119Compare Source
Patch Changes
d23121f]v3.0.118Compare Source
Patch Changes
ad4cfc2]v3.0.117Compare Source
Patch Changes
824b295]v3.0.116Compare Source
Patch Changes
2291047]v3.0.115Compare Source
Patch Changes
70d3980]v3.0.114Compare Source
Patch Changes
v3.0.113Compare Source
Patch Changes
2129c82]v3.0.112Compare Source
Patch Changes
v3.0.111Compare Source
Patch Changes
v3.0.110Compare Source
Patch Changes
2a4f512]v3.0.109Compare Source
Patch Changes
08336f1]v3.0.108Compare Source
Patch Changes
v3.0.107Compare Source
Patch Changes
58bc42d]v3.0.106Compare Source
Patch Changes
v3.0.105Compare Source
Patch Changes
v3.0.104Compare Source
Patch Changes
v3.0.103Compare Source
Patch Changes
5230482]v3.0.102Compare Source
Patch Changes
b7fba77]v3.0.101Compare Source
Patch Changes
v3.0.100Compare Source
Patch Changes
v3.0.99Compare Source
Patch Changes
ebfdad1]v3.0.98Compare Source
Patch Changes
30c9de6]v3.0.97Compare Source
Patch Changes
v3.0.96Compare Source
Patch Changes
v3.0.95Compare Source
Patch Changes
d3769ec]v3.0.94Compare Source
Patch Changes
v3.0.93Compare Source
Patch Changes
v3.0.92Compare Source
Patch Changes
98e83ab]v3.0.91Compare Source
Patch Changes
v3.0.90Compare Source
Patch Changes
v3.0.89Compare Source
Patch Changes
v3.0.88Compare Source
Patch Changes
v3.0.87Compare Source
Patch Changes
v3.0.86Compare Source
Patch Changes
4024a3a]v3.0.85Compare Source
Patch Changes
v3.0.84Compare Source
Patch Changes
v3.0.83Compare Source
Patch Changes
ee4beee]v3.0.82Compare Source
Patch Changes
v3.0.81Compare Source
Patch Changes
v3.0.80Compare Source
Patch Changes
59fcf30]v3.0.79Compare Source
Patch Changes
v3.0.78Compare Source
Patch Changes
v3.0.77Compare Source
Patch Changes
7168375]v3.0.76Compare Source
Patch Changes
471009b]v3.0.75Compare Source
Patch Changes
v3.0.74Compare Source
Patch Changes
v3.0.73Compare Source
Patch Changes
v3.0.72Compare Source
Patch Changes
v3.0.71Compare Source
Patch Changes
d659305]v3.0.70Compare Source
Patch Changes
8bf2660]v3.0.69Compare Source
Patch Changes
53f6731]v3.0.68Compare Source
Patch Changes
96936e5]v3.0.67Compare Source
Patch Changes
v3.0.66Compare Source
Patch Changes
ce9daa3]v3.0.65Compare Source
Patch Changes
be95579]v3.0.64Compare Source
Patch Changes
2810850]v3.0.63Compare Source
Patch Changes
v3.0.62Compare Source
Patch Changes
5fc42fa]v3.0.61Compare Source
Patch Changes
v3.0.60Compare Source
Patch Changes
v3.0.59Compare Source
Patch Changes
65865d8]v3.0.58Compare Source
Patch Changes
v3.0.57Compare Source
Patch Changes
43a74df]v3.0.56Compare Source
Patch Changes
2f8ac87]v3.0.55Compare Source
Patch Changes
7ee3f10]v3.0.54Compare Source
Patch Changes
462ad00]v3.0.53Compare Source
Patch Changes
ea0feb5]v3.0.52Compare Source
Patch Changes
v3.0.51Compare Source
Patch Changes
ded661b]v3.0.50Compare Source
Patch Changes
4de5a1d: chore: excluded tests from src folder in npm package4de5a1d]v3.0.49Compare Source
Patch Changes
v3.0.48Compare Source
Patch Changes
8dc54db: chore: add src folders to package bundlev3.0.47Compare Source
Patch Changes
v3.0.46Compare Source
Patch Changes
v3.0.45Compare Source
Patch Changes
2dc9bfa]v3.0.44Compare Source
Patch Changes
v3.0.43Compare Source
Patch Changes
84b6e6d]v3.0.42Compare Source
Patch Changes
ab57783]v3.0.41Compare Source
Patch Changes
4e28ba0]v3.0.40Compare Source
Patch Changes
v3.0.39Compare Source
Patch Changes
b5dab9b]v3.0.38Compare Source
Patch Changes
46f46e4]v3.0.37Compare Source
Patch Changes
d7e7f1f]v3.0.36Compare Source
Patch Changes
1b11dcb]v3.0.35Compare Source
Patch Changes
0ca078c]v3.0.34Compare Source
Patch Changes
ec24401]v3.0.33Compare Source
Patch Changes
v3.0.32Compare Source
Patch Changes
34d1c8a]v3.0.31Compare Source
Patch Changes
fdce123]v3.0.30Compare Source
Patch Changes
d4486d2]v3.0.29Compare Source
Patch Changes
v3.0.28Compare Source
Patch Changes
3219eab: feat(react): support async/function headers in useObjectThe
useObjecthook now accepts headers as an async function, enabling dynamic header generation (e.g., fetching auth tokens) without causing the hook to re-render.This provides parity with
useChatand resolves issues with infinite loops when using state-based headers withuseEffect.v3.0.26Compare Source
Patch Changes
b64f256]v3.0.25Compare Source
Patch Changes
4f236c8]v3.0.24Compare Source
Patch Changes
000a0a6: Fix: ensureuseChatuses the latestonToolCall(and other callbacks) to avoid stale closures.Changes:
useChatto use intermediary proxy callbacks that forward to refs, ensuring the latest callbacks are always used without recreating the chat instance.onToolCallis invoked after a prop change.Related to: #8148
v3.0.23Compare Source
Patch Changes
a4c680a]8c6f067]v3.0.22Compare Source
Patch Changes
f0d29de]v3.0.21Compare Source
Patch Changes
9667780]v3.0.20Compare Source
Patch Changes
f748c46]v3.0.19Compare Source
Patch Changes
v3.0.18Compare Source
Patch Changes
d6ec0e2]v3.0.17Compare Source
Patch Changes
af0955e]v3.0.16Compare Source
Patch Changes
81adf59]v3.0.15Compare Source
Patch Changes
3a73fb3]v3.0.14Compare Source
Patch Changes
3f9453f]v3.0.13Compare Source
Patch Changes
e2c445d]v3.0.12Compare Source
Patch Changes
d937c8f]v3.0.11Compare Source
Patch Changes
ad4cfc2]v3.0.10Compare Source
Patch Changes
08336f1]v3.0.9Compare Source
Patch Changes
ebfdad1]v3.0.8Compare Source
Patch Changes
v3.0.7Compare Source
Patch Changes
v3.0.6Compare Source
Patch Changes
53f6731]v3.0.5Compare Source
Patch Changes
65865d8][
v3.0.4](https://redirect.github.com/verceConfiguration
📅 Schedule: (UTC)
* 0-4,22-23 * * 1-5)* * * * 0,6)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.